/*
 * Attempt to solve the Siruseri Sport Stadium Problem
 * http://www.iarcs.org.in/inoi/contests/sep2004/Advanced-1.php
 * 
 * Author: Pramod Subramanyan
 * Date: 16-Mar-2007
 * Email: pramod.subramanyan@gmail.com
 *
 */

#include "stdafx.h"

#include <iostream>
#include <algorithm>
#include <vector>

using namespace std;

struct allocation  {
	int start;
	int end;
};

inline bool operator<(allocation a, allocation b)  {
	if(a.end < b.end) return true;
	else  {
		if(a.end == b.end) return a.start < b.start;
		else return false;
	}
}
inline bool overlaps(allocation a, allocation b)  {
	if(a.start < b.start)
		return (a.end >= b.start);
	else
		return (b.end >= a.start);
}

void sss_main()  {
	int n_events;
	cin >> n_events;

	vector<allocation> events(n_events);
	for(int i = 0; i < n_events; i++)  {
		int start, length;
		cin >> start >> length;

		allocation evt = { start, start+length-1 };
		events[i] = evt;
	}

	sort(events.begin(), events.end());
	
	// pick the event that finishes first
	vector<allocation>::iterator current_pick = events.begin();
	vector<allocation>::iterator i = current_pick;

	int n_picks = 1;

	for(i++; i != events.end(); i++)  {
		if(!overlaps(*current_pick, *i))  {
			current_pick = i;
			n_picks++;
		}
	}
	cout << n_picks << endl;
}